<script setup>
import {ref} from 'vue'
import EditorWrap from '@/components/EditorWrap.vue'
import { uploadFile } from './utils/upload';
const content = ref('<h1>hello world</h1>')
const anchors = ref();
const editorOptions = {
  uploadFile: (file)=>{
    console.log('this is uploadFile:', file);
    return uploadFile(file);
  },
}
const save = (content)=>{
  console.log('this is save:', content);
}
const share = (content)=>{
  console.log('this is share:', content);
}
</script>

<template>
  <EditorWrap v-model:content="content" v-model:anchors="anchors" @save="save" @share="share" :editorOptions="editorOptions"/>
</template>

<style lang="scss" scoped>
</style>
